import QtQuick
import QtQuick.Layouts
import Fk.RoomElement

ColumnLayout {
  id: root
  anchors.fill: parent
  property var extra_data: ({ name: "", data: [] })
  signal finish()

  BigGlowText {
    Layout.fillWidth: true
    Layout.preferredHeight: childrenRect.height + 4

    text: luatr(extra_data.name)
  }


  Text {
    Layout.fillWidth: true
    Layout.fillHeight: true

    font.pixelSize: 25
    color: "#E4D5A0"
    text: extra_data.data.map(function(str) { return luatr(str); }).join(", ")

    wrapMode: Text.WordWrap
    textFormat: TextEdit.RichText
  }

  onExtra_dataChanged: {
    if (typeof(extra_data.data) == "string") {
      extra_data.data = [ extra_data.data ];
    }
  }
}

